package xj.graph2d.template;

import static xj.graph2d.template.VisualClassTemplate.ATTR_BG;
import static xj.graph2d.template.VisualClassTemplate.ATTR_FG;
import static xj.graph2d.template.VisualClassTemplate.NODE_COLOR;
import static xj.graph2d.template.VisualClassTemplate.NODE_FONT;
import static xj.graph2d.template.VisualClassTemplate.OPER_BG;
import static xj.graph2d.template.VisualClassTemplate.OPER_FG;

import java.awt.Color;
import java.util.Map;

import javax.swing.Icon;

import xj.graph2d.ArrowAttr;
import xj.graph2d.DrawAttr;
import xj.graph2d.DrawShape;
import xj.graph2d.DrawShapeConstants;
import xj.graph2d.EllipseShape;
import xj.graph2d.GraphEdgeBase;
import xj.graph2d.GraphNodeBase;
import xj.graph2d.Group;
import xj.graph2d.LineShape;
import xj.graph2d.TextShape;
import xj.graph2d.shapes.BoxLabel;
import xj.graph2d.shapes.GraphEdgeShape;
import xj.graph2d.shapes.OrthogonalLineShape;
import xj.graph2d.shapes.OrthogonalSelfLoop;
import xj.graph2d.shapes.OrthogonalSelfLoop4;
import xj.graph2d.shapes.PolyLineShape;
import xj.graph2d.shapes.ShapeConstants;
import xj.graph2d.shapes.ShapeIcon;
import xj.graph2d.shapes.block.BlockShape;
import xj.graph2d.shapes.block.SimpleStatementShape;
import xj.graph2d.shapes.uml.ClassShape;
import xj.graph2d.shapes.uml.UMLUtil;
import xj.graph2d.template.uml.UMLAssociationModelListener;
import xj.graph2d.template.uml.UMLDelegationModelListener;
import xj.graph2d.template.uml.UMLClassModelListener;
import xj.graph2d.template.uml.UMLEnumModelListener;
import xj.graph2d.template.uml.UMLInterfaceModelListener;
import xj.model.uml.Enumeration;
import xj.model.uml.Navigability;
import xj.model.uml.UMLAssociation;
import xj.model.uml.UMLClass;
import xj.model.uml.UMLInterface;

public class UMLClassDiagramTemplate extends UMLTemplate {

  // Class Diagram

  static String[] classShapeIconNames = {
    "Class1-Icon", "Class2-Icon",
  };

  static String[][] classNodeEdgeToolNames = {
    // TOP_SIDE
    { null, "Generalization5-Popup", "Realization5-Popup" },

    // BOTTOM_SIDE 
    { "Generalization6-Popup", "Realization6-Popup" },

    // LEFT_SIDE
    { "Aggregation1-Popup",    "Aggregation2-Popup",
      "Composition1-Popup",    "Composition2-Popup", 
      "Association1-Popup",    "Association2-Popup", "Association3-Popup", 
      "Generalization1-Popup", "Generalization2-Popup",
      "Realization1-Popup",    "Realization2-Popup" }, 

    // RIGHT_SIDE
    { "Aggregation3-Popup",    "Aggregation4-Popup",
      "Composition3-Popup",    "Composition4-Popup", 
      "Association1-Popup",    "Association4-Popup", "Association5-Popup", 
      "Generalization3-Popup", "Generalization4-Popup",
      "Realization3-Popup",    "Realization4-Popup" }, 
  };

  static String[][] classDiagramGapToolNames = {
    { "Class1", "Class2", "Class3", "Class4", },
  };

  static String[] assocEdgeShapeNames = {
    "Association-Shape1", 
    "Association-Shape2", 
    "Association-Shape3", 
    "Association-Shape4",
    "Association-Shape5",
  };

  static String[] realizationEdgeShapeNames = {
    "Realization-Shape1", 
    "Realization-Shape2", 
    "Realization-Shape3", 
    "Realization-Shape4", 
    "Realization-Shape5", 
  };

  static String[] generalizationEdgeShapeNames = {
    "Generalization-Shape1", 
    "Generalization-Shape2", 
    "Generalization-Shape3", 
    "Generalization-Shape4", 
    "Generalization-Shape5", 
  };

  static String[] mixinEdgeShapeNames = {
    "MixIn-Shape1", 
    "MixIn-Shape2", 
    "MixIn-Shape3", 
    "MixIn-Shape4", 
    "MixIn-Shape5", 
  };

  static String[] delegationEdgeShapeNames = {
    "Delegation-Shape1", 
    "Delegation-Shape2", 
    "Delegation-Shape3", 
    "Delegation-Shape4", 
    "Delegation-Shape5", 
  };

  static String[] dependencyEdgeShapeNames = {
    "Dependency-Shape1", 
    "Dependency-Shape2", 
    "Dependency-Shape3", 
    "Dependency-Shape4", 
    "Dependency-Shape5", 
  };

  public UMLClassDiagramTemplate() { }

  public void initTools() {
    if (isClassicTemplate()) { 
      String[] temp = { ".Class1", ".Class2", ".Class3", ".Class4" }; 
      for (int i = 0; i < temp.length; i++) { 
	addNodeToolNames(name + temp[i],  classNodeEdgeToolNames);
	addShapeToolNames(name + temp[i],  classShapeIconNames);
      }
    }
    if (isModernTemplate()) { 
      String[] temp = { ".Class1", ".Class2" };
      for (int i = 0; i < temp.length; i++) { 
	addNodeToolNames(name + temp[i] + MODERN_STYLE,  classNodeEdgeToolNames);
	addShapeToolNames(name + temp[i] + MODERN_STYLE,  classShapeIconNames);
      }
    }
    String[] classTemp = { "MixIn", "Interface", "Interface2" };
    for (int i = 0; i < classTemp.length; i++) { 
      addNodeToolNames(name + classTemp[i],  classNodeEdgeToolNames);
      addShapeToolNames(name + classTemp[i],  classShapeIconNames);
    }

    // edge shape templates

    String[] assocTemp = { ".Aggregation", ".Composition", 
			   ".Association1", ".Association2", ".Association3" };
    for (int i = 0; i < assocTemp.length; i++) { 
      addEdgeToolNames(name + assocTemp[i], assocEdgeShapeNames);
    }

    // generalization, realization, mixin, delegation, dependency 
    addEdgeToolNames(name + ".Realization", realizationEdgeShapeNames);
    addEdgeToolNames(name + ".Generalization", generalizationEdgeShapeNames);

    addEdgeToolNames(name + ".MixIn", mixinEdgeShapeNames);
    addEdgeToolNames(name + ".Delegation", delegationEdgeShapeNames);
    addEdgeToolNames(name + ".Dependency", dependencyEdgeShapeNames);
  }

  public String[][] getGapToolNames() { 
    return classDiagramGapToolNames;
  }

  @Override
  public void makeTemplate(Map iconMap) {
    if (debug) {
      System.out.println("UMLClassDiagramTemplate.makeTemplate(): styleOptions" + 
			 (styleOptions != null ? "!=null" : "==null"));
    } 

    ClassShape.initStyle(iconMap, this);

    // class
    addClassIcons();
    if (isClassicTemplate()) { 
      addClassTemplate("Class1", false, false, false, 100, 130, iconMap);
      addClassTemplate("Class2", true, false, false, 100, 30, iconMap);
      addClassTemplate("Class3", false, true, false, 120, 130, iconMap);
      addClassTemplate("Class4", true, true, false, 120, 30, iconMap);
    }
    if (isModernTemplate()) { 
      addClassTemplate("Class1" + MODERN_STYLE, false, false, false, true, 100, 100, iconMap);
      addClassTemplate("Class2" + MODERN_STYLE, true, false, false, true, 100, 30, iconMap);    

      SimpleStatementShape stmt;
      stmt = makeElementShape(SimpleStatementShape.ATTRIBUTE,
			      "Attribute", "attribute", ATTR_FG, ATTR_BG);
      add(new TemplateToolButton("Attribute", stmt, 36, 16, false, true));
      stmt = makeElementShape(SimpleStatementShape.METHOD_DECL,
			      "Operation", "operation", OPER_FG, OPER_BG);
      add(new TemplateToolButton("Operation", stmt, 36, 16, false, true));
    }

    // generic class
    // addClassTemplate("Class10", false, false, true, 100, 130, iconMap);

    if (isClassicTemplate()) { 
      addEnumTemplate("Enum1", true, 100, 40, iconMap);
      addEnumTemplate("Enum2", false, 100, 60, iconMap);
    }
    if (isModernTemplate()) { 
      addEnumTemplate("Enum1" + MODERN_STYLE, true, true, 100, 40, iconMap);
      addEnumTemplate("Enum2" + MODERN_STYLE, false, true, 100, 60, iconMap);

      SimpleStatementShape stmt;
      stmt = makeElementShape(SimpleStatementShape.ENUMERATION,
			      "Enumeration", "enumeration", ENUM_FG, ENUM_BG);
      add(new TemplateToolButton("Enumeration", stmt, 36, 16, false, true));
    }

    // generalization
    LineShape line1 = new LineShape(0, 50, 50, 0);
    GraphEdgeShape line = new GraphEdgeShape(0, 50, 50, 0); 
    addGeneralizationTemplate("Generalization", line, line1, 36, 24, 
			      false, GENERALIZATION_COLOR);

    // realization
    line1 = new LineShape(0, 50, 50, 0);
    line = new GraphEdgeShape(0, 50, 50, 0); 
    addGeneralizationTemplate("Realization", line, line1, 36, 24, true, 
			      GENERALIZATION_COLOR);

    // mixin
    line1 = new LineShape(0, 50, 50, 0);
    line = new GraphEdgeShape(0, 50, 50, 0); 
    addGeneralizationTemplate("MixIn", line, line1, 36, 24, MIXIN_EDGE, false,
			      MIXIN_COLOR, TemplateToolButton.TOOL_PANEL_BUTTON);

    // arregation
    addAggregationTemplate("Aggregation", false, ASSOCIATION_COLOR);
    // composition
    addAggregationTemplate("Composition", true, ASSOCIATION_COLOR);

    // association
    addAssociationTemplate("Association1", null, null, ASSOCIATION_COLOR);
    addAssociationTemplate("Association2", Navigability.Navigable, null, ASSOCIATION_COLOR);

    GraphEdgeShape oedge = new GraphEdgeShape(true, 0, 80);
    oedge.addPoint(100, 20);
    oedge.calculateBounds();
    OrthogonalLineShape oline = new OrthogonalLineShape(0, 80);
    oline.addPoint(100, 20);
    oline.calculateBounds();
    addAssociationTemplate("Association3", oedge, oline, null, null, ASSOCIATION_COLOR);

    // self loop 
    oedge = new GraphEdgeShape(true, false, 0, 50, 50, 100, 30, 30,
			       ShapeConstants.NORTH_EAST);
    oedge.calculateBounds();
    OrthogonalSelfLoop4 loop = new OrthogonalSelfLoop4(0, 50, 50, 100, 30, 30,
						       ShapeConstants.NORTH_EAST);
    loop.calculateBounds();
    addAssociationTemplate("Association4", oedge, loop, null, null, ASSOCIATION_COLOR);

    // self loop 
    oedge = new GraphEdgeShape(true, true, 30, 50, 70, 50, 0, 30,
			       ShapeConstants.NORTH);
    oedge.calculateBounds();
    OrthogonalSelfLoop loop2 = new OrthogonalSelfLoop(30, 50, 70, 50, 30,
						      ShapeConstants.NORTH);
    loop2.calculateBounds();
    addAssociationTemplate("Association5", oedge, loop2, null, null, ASSOCIATION_COLOR);

    // delegation
    addDelegationTemplate("Delegation", DELEGATION_COLOR);

    // dependency
    addDependencyTemplate("Dependency", DEPENDENCY_COLOR);

    // interfaces
    addInterfaceProvideTemplate("Interface", 10, 0, 16, 16,
				INTERFACE_PROVIDE_COLOR);
    addInterfaceRequiredTemplate("Interface2", 10, 0, 16, 16,
				 INTERFACE_REQUIRED_COLOR);

    // notes
    addNotesTemplate("Notes1", true, "Link");
    addNotesTemplate("Notes2", false);

    // link
    addNotesLinkTemplate("Link", new LineShape(0, 20, 50, 20));

    makeNodeEdgePopupTemplates();
    makeEdgeShapeTemplates();
  }

  protected void makeNodeEdgePopupTemplates() { 

    // generalization 

    LineShape line1 = new LineShape(0, 10, 40, 10);
    addGeneralizationTemplate("Generalization1-Popup", "Generalization", line1, 25, 10, 
			      false, true, 
			      GENERALIZATION_COLOR, TemplateToolButton.POPUP_BUTTON);
    line1 = new LineShape(40, 10, 0, 10);
    addGeneralizationTemplate("Generalization2-Popup", "Generalization", line1, 25, 10, 
			      false, false, 
			      GENERALIZATION_COLOR, TemplateToolButton.POPUP_BUTTON);  
    line1 = new LineShape(0, 10, 40, 10);
    addGeneralizationTemplate("Generalization3-Popup", "Generalization", line1, 25, 10,
			      false, false, 
			      GENERALIZATION_COLOR, TemplateToolButton.POPUP_BUTTON);
    line1 = new LineShape(40, 10, 0, 10);
    addGeneralizationTemplate("Generalization4-Popup", "Generalization", line1, 25, 10, 
			      false, true, 
			      GENERALIZATION_COLOR, TemplateToolButton.POPUP_BUTTON);  

    line1 = new LineShape(10, 40, 10, 0);
    addGeneralizationTemplate("Generalization5-Popup", "Generalization", line1, 16, 20, 
			      false, false, 
			      GENERALIZATION_COLOR, TemplateToolButton.POPUP_BUTTON);
    line1 = new LineShape(10, 40, 10, 0);
    addGeneralizationTemplate("Generalization6-Popup", "Generalization", line1, 16, 20, 
			      false, true, 
			      GENERALIZATION_COLOR, TemplateToolButton.POPUP_BUTTON);  

    // realization 

    line1 = new LineShape(0, 10, 40, 10);
    addGeneralizationTemplate("Realization1-Popup", "Realization", line1, 25, 10, true, true,
			      GENERALIZATION_COLOR, TemplateToolButton.POPUP_BUTTON);
    line1 = new LineShape(40, 10, 0, 10);
    addGeneralizationTemplate("Realization2-Popup", "Realization", line1, 25, 10, true, false, 
			      GENERALIZATION_COLOR, TemplateToolButton.POPUP_BUTTON);  
    line1 = new LineShape(0, 10, 40, 10);
    addGeneralizationTemplate("Realization3-Popup", "Realization", line1, 25, 10, true, false,
			      GENERALIZATION_COLOR, TemplateToolButton.POPUP_BUTTON);
    line1 = new LineShape(40, 10, 0, 10);
    addGeneralizationTemplate("Realization4-Popup", "Realization", line1, 25, 10, true, true, 
			      GENERALIZATION_COLOR, TemplateToolButton.POPUP_BUTTON);  

    line1 = new LineShape(10, 40, 10, 0);
    addGeneralizationTemplate("Realization5-Popup", "Realization", line1, 16, 20, true, false,
			      GENERALIZATION_COLOR, TemplateToolButton.POPUP_BUTTON);
    line1 = new LineShape(10, 40, 10, 0);
    addGeneralizationTemplate("Realization6-Popup", "Realization", line1, 16, 20, true, true, 
			      GENERALIZATION_COLOR, TemplateToolButton.POPUP_BUTTON);  

    // aggregation 

    line1 = new LineShape(0, 10, 40, 10);
    addAggregationTemplate("Aggregation1-Popup", "Aggregation", line1, 25, 10, 
			   false, true, 
			   ASSOCIATION_COLOR, TemplateToolButton.POPUP_BUTTON);
    line1 = new LineShape(40, 10, 0, 10);
    addAggregationTemplate("Aggregation2-Popup", "Aggregation", line1, 25, 10, 
			   false, false, 
			   ASSOCIATION_COLOR, TemplateToolButton.POPUP_BUTTON);
    line1 = new LineShape(0, 10, 40, 10);
    addAggregationTemplate("Aggregation3-Popup", "Aggregation", line1, 25, 10, 
			   false, false, 
			   ASSOCIATION_COLOR, TemplateToolButton.POPUP_BUTTON);
    line1 = new LineShape(40, 10, 0, 10);
    addAggregationTemplate("Aggregation4-Popup", "Aggregation", line1, 25, 10, 
			   false, true, 
			   ASSOCIATION_COLOR, TemplateToolButton.POPUP_BUTTON);

    // composition 

    line1 = new LineShape(0, 10, 40, 10);
    addAggregationTemplate("Composition1-Popup", "Composition", line1, 25, 10, 
			   true, true,
			   ASSOCIATION_COLOR, TemplateToolButton.POPUP_BUTTON);
    line1 = new LineShape(40, 10, 0, 10);
    addAggregationTemplate("Composition2-Popup", "Composition", line1, 25, 10, 
			   true, false, 
			   ASSOCIATION_COLOR, TemplateToolButton.POPUP_BUTTON);
    line1 = new LineShape(0, 10, 40, 10);
    addAggregationTemplate("Composition3-Popup", "Composition", line1, 25, 10, 
			   true, false,
			   ASSOCIATION_COLOR, TemplateToolButton.POPUP_BUTTON);
    line1 = new LineShape(40, 10, 0, 10);
    addAggregationTemplate("Composition4-Popup", "Composition", line1, 25, 10, 
			   true, true, 
			   ASSOCIATION_COLOR, TemplateToolButton.POPUP_BUTTON);

    // association 

    line1 = new LineShape(0, 10, 40, 10);
    addAssociationTemplate("Association1-Popup", "Association1", line1, 25, 10, 
			   null, null, false, 
			   ASSOCIATION_COLOR, TemplateToolButton.POPUP_BUTTON);

    line1 = new LineShape(0, 10, 40, 10);
    addAssociationTemplate("Association2-Popup", "Association2", line1, 25, 10, 
			   Navigability.Navigable, null, true,
			   ASSOCIATION_COLOR, TemplateToolButton.POPUP_BUTTON);
    line1 = new LineShape(40, 10, 0, 10);
    addAssociationTemplate("Association3-Popup", "Association2", line1, 25, 10, 
			   Navigability.Navigable, null, false,
			   ASSOCIATION_COLOR, TemplateToolButton.POPUP_BUTTON);

    line1 = new LineShape(0, 10, 40, 10);
    addAssociationTemplate("Association4-Popup", "Association2", line1, 25, 10, 
			   null, Navigability.Navigable, true,
			   ASSOCIATION_COLOR, TemplateToolButton.POPUP_BUTTON);
    line1 = new LineShape(40, 10, 0, 10);
    addAssociationTemplate("Association5-Popup", "Association2", line1, 25, 10, 
			   null, Navigability.Navigable, false,
			   ASSOCIATION_COLOR, TemplateToolButton.POPUP_BUTTON);
  }

  protected void makeEdgeShapeTemplates() { 

    // association edge shape template 

    LineShape line = new LineShape(0, 10, 100, 10);
    addAssociationShapeTemplate("Association-Shape1", line, ASSOCIATION_COLOR, 25, 10);
    
    PolyLineShape pline = new PolyLineShape(0, 20);
    pline.addPoint(30, 40);
    pline.addPoint(70, 0);
    pline.addPoint(100, 20);
    addAssociationShapeTemplate("Association-Shape2", pline, ASSOCIATION_COLOR, 25, 10);

    OrthogonalLineShape oline = new OrthogonalLineShape(0, 0);
    oline.addPoint(40, 40);
    oline.addPoint(100, 0);
    oline.calculateBounds();
    addAssociationShapeTemplate("Association-Shape3", oline, ASSOCIATION_COLOR, 25, 10);

    oline = new OrthogonalLineShape(0, 40);
    oline.addPoint(100, 5);
    oline.calculateBounds();
    addAssociationShapeTemplate("Association-Shape4", oline, ASSOCIATION_COLOR, 25, 10);

    oline = new OrthogonalLineShape(false, 0, 40);
    oline.addPoint(50, 20);
    oline.addPoint(100, 0);
    oline.calculateBounds();
    addAssociationShapeTemplate("Association-Shape5", oline, ASSOCIATION_COLOR, 25, 10);

    // generalization edge shape template 

    line = new LineShape(0, 10, 100, 10);
    addGeneralizationShapeTemplate("Generalization-Shape1", line, false, GENERALIZATION_COLOR, 25, 10);
    
    pline = new PolyLineShape(0, 20);
    pline.addPoint(30, 40);
    pline.addPoint(70, 0);
    pline.addPoint(100, 20);
    addGeneralizationShapeTemplate("Generalization-Shape2", pline, false, GENERALIZATION_COLOR, 25, 10);

    oline = new OrthogonalLineShape(0, 0);
    oline.addPoint(40, 40);
    oline.addPoint(100, 0);
    oline.calculateBounds();
    addGeneralizationShapeTemplate("Generalization-Shape3", oline, false, GENERALIZATION_COLOR, 25, 10);

    oline = new OrthogonalLineShape(0, 40);
    oline.addPoint(100, 5);
    oline.calculateBounds();
    addGeneralizationShapeTemplate("Generalization-Shape4", oline, false, GENERALIZATION_COLOR, 25, 10);

    oline = new OrthogonalLineShape(false, 0, 40);
    oline.addPoint(50, 20);
    oline.addPoint(100, 0);
    oline.calculateBounds();
    addGeneralizationShapeTemplate("Generalization-Shape5", oline, false, GENERALIZATION_COLOR, 25, 10);

    // realization edge shape template 

    line = new LineShape(0, 10, 100, 10);
    addGeneralizationShapeTemplate("Realization-Shape1", line, true, GENERALIZATION_COLOR, 25, 10);
    
    pline = new PolyLineShape(0, 20);
    pline.addPoint(30, 40);
    pline.addPoint(70, 0);
    pline.addPoint(100, 20);
    addGeneralizationShapeTemplate("Realization-Shape2", pline, true, GENERALIZATION_COLOR, 25, 10);

    oline = new OrthogonalLineShape(0, 0);
    oline.addPoint(40, 40);
    oline.addPoint(100, 0);
    oline.calculateBounds();
    addGeneralizationShapeTemplate("Realization-Shape3", oline, true, GENERALIZATION_COLOR, 25, 10);

    oline = new OrthogonalLineShape(0, 40);
    oline.addPoint(100, 5);
    oline.calculateBounds();
    addGeneralizationShapeTemplate("Realization-Shape4", oline, true, GENERALIZATION_COLOR, 25, 10);

    oline = new OrthogonalLineShape(false, 0, 40);
    oline.addPoint(50, 20);
    oline.addPoint(100, 0);
    oline.calculateBounds();
    addGeneralizationShapeTemplate("Realization-Shape5", oline, true, GENERALIZATION_COLOR, 25, 10);

    // mixin edge shape template 

    line = new LineShape(0, 10, 100, 10);
    addGeneralizationShapeTemplate("MixIn-Shape1", line, false, MIXIN_COLOR, 25, 10);
    
    pline = new PolyLineShape(0, 20);
    pline.addPoint(30, 40);
    pline.addPoint(70, 0);
    pline.addPoint(100, 20);
    addGeneralizationShapeTemplate("MixIn-Shape2", pline, false, MIXIN_COLOR, 25, 10);

    oline = new OrthogonalLineShape(0, 0);
    oline.addPoint(40, 40);
    oline.addPoint(100, 0);
    oline.calculateBounds();
    addGeneralizationShapeTemplate("MixIn-Shape3", oline, false, MIXIN_COLOR, 25, 10);

    oline = new OrthogonalLineShape(0, 40);
    oline.addPoint(100, 5);
    oline.calculateBounds();
    addGeneralizationShapeTemplate("MixIn-Shape4", oline, false, MIXIN_COLOR, 25, 10);

    oline = new OrthogonalLineShape(false, 0, 40);
    oline.addPoint(50, 20);
    oline.addPoint(100, 0);
    oline.calculateBounds();
    addGeneralizationShapeTemplate("MixIn-Shape5", oline, false, MIXIN_COLOR, 25, 10);

    // delegation edge shape template 

    line = new LineShape(0, 10, 100, 10);
    addDelegationShapeTemplate("Delegation-Shape1", line, DELEGATION_COLOR, 25, 10);
    
    pline = new PolyLineShape(0, 20);
    pline.addPoint(30, 40);
    pline.addPoint(70, 0);
    pline.addPoint(100, 20);
    addDelegationShapeTemplate("Delegation-Shape2", pline, DELEGATION_COLOR, 25, 10);

    oline = new OrthogonalLineShape(0, 0);
    oline.addPoint(40, 40);
    oline.addPoint(100, 0);
    oline.calculateBounds();
    addDelegationShapeTemplate("Delegation-Shape3", oline, DELEGATION_COLOR, 25, 10);

    oline = new OrthogonalLineShape(0, 40);
    oline.addPoint(100, 5);
    oline.calculateBounds();
    addDelegationShapeTemplate("Delegation-Shape4", oline, DELEGATION_COLOR, 25, 10);

    oline = new OrthogonalLineShape(false, 0, 40);
    oline.addPoint(50, 20);
    oline.addPoint(100, 0);
    oline.calculateBounds();
    addDelegationShapeTemplate("Delegation-Shape5", oline, DELEGATION_COLOR, 25, 10);

    // dependency edge shape template 

    line = new LineShape(0, 10, 100, 10);
    addDependencyShapeTemplate("Dependency-Shape1", line, DEPENDENCY_COLOR, 25, 10);
    
    pline = new PolyLineShape(0, 20);
    pline.addPoint(30, 40);
    pline.addPoint(70, 0);
    pline.addPoint(100, 20);
    addDependencyShapeTemplate("Dependency-Shape2", pline, DEPENDENCY_COLOR, 25, 10);

    oline = new OrthogonalLineShape(0, 0);
    oline.addPoint(40, 40);
    oline.addPoint(100, 0);
    oline.calculateBounds();
    addDependencyShapeTemplate("Dependency-Shape3", oline, DEPENDENCY_COLOR, 25, 10);

    oline = new OrthogonalLineShape(0, 40);
    oline.addPoint(100, 5);
    oline.calculateBounds();
    addDependencyShapeTemplate("Dependency-Shape4", oline, DEPENDENCY_COLOR, 25, 10);

    oline = new OrthogonalLineShape(false, 0, 40);
    oline.addPoint(50, 20);
    oline.addPoint(100, 0);
    oline.calculateBounds();
    addDependencyShapeTemplate("Dependency-Shape5", oline, DEPENDENCY_COLOR, 25, 10);

  }

  protected void addClassTemplate(String tempName, boolean single,
				  boolean active, boolean generic, float w, float h) {
    addClassTemplate(tempName, single, active, generic, false, w, h, null);
  }

  protected void addClassTemplate(String tempName, boolean single,
				  boolean active, boolean generic, 
				  float w, float h, Map iconMap) {
    addClassTemplate(tempName, single, active, generic, false, w, h, iconMap);
  }

  protected void addClassTemplate(String tempName, boolean single,
				  boolean active, boolean generic, 
				  boolean useBlock, 
				  float w, float h, Map iconMap) {
    ClassShape shape, iconShape;
    if (single) {
      shape = new ClassShape(0, 0, w, h);
      iconShape = new ClassShape(0, 0, w, h);
    } else {
      float[] divs = new float[] { 0.2f, 0.4f };
      shape = new ClassShape(0, 0, w, h, divs);
      iconShape = new ClassShape(0, 0, w, h, divs);
    }

    setNodeAttr(iconShape);
    setNodeColor(iconShape, CLASS_FG, CLASS_BG);
    setColor(iconShape.getDrawAttrAbstractClass(), ABSTRACT_CLASS_FG, ABSTRACT_CLASS_BG);
    setColor(iconShape.getDrawAttrInterface(), INTERFACE_FG, INTERFACE_BG);
    setColor(iconShape.getDrawAttrActiveClass(), ACTIVE_CLASS_FG, ACTIVE_CLASS_BG);
    setColor(iconShape.getDrawAttrMixinClass(), MIXIN_CLASS_FG, MIXIN_CLASS_BG);
    setColor(iconShape.getDrawAttrEnum(), ENUM_FG, ENUM_BG);
    setColor(iconShape.getDrawAttrException(), EXCEPTION_FG, EXCEPTION_BG);

    setNodeAttr(shape);
    setColor(shape.getDrawAttrClass(), CLASS_FG, CLASS_BG);
    setColor(shape.getDrawAttrAbstractClass(), ABSTRACT_CLASS_FG, ABSTRACT_CLASS_BG);
    setColor(shape.getDrawAttrInterface(), INTERFACE_FG, INTERFACE_BG);
    setColor(shape.getDrawAttrActiveClass(), ACTIVE_CLASS_FG, ACTIVE_CLASS_BG);
    setColor(shape.getDrawAttrMixinClass(), MIXIN_CLASS_FG, MIXIN_CLASS_BG);
    setColor(shape.getDrawAttrEnum(), ENUM_FG, ENUM_BG);
    setColor(shape.getDrawAttrException(), EXCEPTION_FG, EXCEPTION_BG);

    shape.setActive(active);
    iconShape.setActive(active);
    if (generic) {
      DrawShape tshape = makeGenericTemplateShape(w / 2 + 10, 18);
      shape.setTemplateShape(tshape);
    }

    TextShape stereotype = makeContentText(null, "stereotype", "\u00AB", "\u00BB", 
					   true, STEREOTYPE_FONT, STEREOTYPE_COLOR);
    TextShape pkgname = makeContentText(null, "package", null, null, 
					true, PACKAGE_FONT, PACKAGE_COLOR);
    BoxLabel header;
    if (useIconInLabel() && iconMap != null) {
      BoxLabel label = makeTitleLabel("ClassName", iconMap, CLASS_NAME_FONT,
				      CLASS_NAME_COLOR);
      header = UMLUtil.makeHeader(label, stereotype, pkgname);
    } else {
      TextShape text = makeTitleText("ClassName", CLASS_NAME_FONT,
				     CLASS_NAME_COLOR);
      header = UMLUtil.makeHeader(text, stereotype, pkgname);
    }
    header.setClipSubShapes(true);
    shape.setLabel(DrawShapeConstants.ROLE_NODE_TITLE_LABEL, header);

    shape.setAcceptSubshape(false);
    shape.setScaleMode(DrawShapeConstants.SCALE_EXCLUDE_SUBSHAPE | 
		       DrawShapeConstants.SCALE_EXCLUDE_GUTTER);

    UMLClass model = new UMLClass();
    model.setActive(active);
    shape.setModel(model);
    shape.setModelListener(new UMLClassModelListener(useIconInLabel() ? iconMap
						     : null, this));

    DrawShape attr, oper;
    if (useBlock) { 
      attr = makeBlockShape(BlockShape.ATTRIBUTE_LIST, SimpleStatementShape.ATTRIBUTE,
			    ATTR_FG, ATTR_BG, "Attribute", "attribute"); 
      oper = makeBlockShape(BlockShape.METHOD_LIST, SimpleStatementShape.METHOD_DECL,
			    OPER_FG, OPER_BG, "Operation", "operation");       
    } else { 
      if (useIconInLabel() && iconMap != null) {
	attr = makeContentGroup("attribute", iconMap, ATTRIBUTE_ICON,
				ATTRIBUTE_FONT, ATTRIBUTE_COLOR);
	oper = makeContentGroup("operation", iconMap, OPERATION_ICON,
				OPERATION_FONT, OPERATION_COLOR);
      } else {
	attr = makeContentGroup("attribute", null, null, ATTRIBUTE_FONT,
				ATTRIBUTE_COLOR);
	oper = makeContentGroup("operation", null, null, OPERATION_FONT,
				OPERATION_COLOR);
      }
    }
    attr.setClipSubShapes(true);
    oper.setClipSubShapes(true);
    shape.initAttributeOperation(attr, oper);
    shape.fitCompartments();
    //shape.doLayout();

    add(new TemplateToolButton(tempName, shape, iconShape, 36, 30, false, true));
  }

  protected void addClassIcons() { 
    DrawShape iconShape = new ClassShape(0, 0, 30, 10);
    setNodeAttr(iconShape);
    setNodeColor(iconShape, CLASS_FG, CLASS_BG);
    Icon icon = new ShapeIcon(iconShape, 20, 20); 
    putIcon("Class1-Icon", icon);

    float[] divs = new float[] { 0.2f, 0.4f };
    iconShape = new ClassShape(0, 0, 30, 30, divs);
    setNodeAttr(iconShape);
    setNodeColor(iconShape, CLASS_FG, CLASS_BG);
    icon = new ShapeIcon(iconShape, 20, 20); 
    putIcon("Class2-Icon", icon);

  }

  protected void addEnumTemplate(String tempName, boolean single,
				 float w, float h, 
				 Map iconMap) {
    addEnumTemplate(tempName, single, false, w, h, iconMap);
  }

  protected void addEnumTemplate(String tempName, boolean single,
				 boolean useBlock, 
				 float w, float h, 
				 Map iconMap) {
    ClassShape shape, iconShape;
    if (single) {
      shape = new ClassShape(0, 0, w, h);
      iconShape = new ClassShape(0, 0, w, h);
    } else {
      float[] divs = new float[] { 0.6f };
      shape = new ClassShape(0, 0, w, h, divs);
      iconShape = new ClassShape(0, 0, w, h, divs);
    }
    shape.setEnum(true); 

    setNodeAttr(iconShape);
    setNodeColor(iconShape, ENUM_FG, ENUM_BG);
 
    setNodeAttr(shape);
    setNodeColor(shape, ENUM_FG, ENUM_BG);
    
    TextShape stereotype = makeContentText("enumeration", "stereotype", "\u00AB", "\u00BB", 
					   true, STEREOTYPE_FONT, STEREOTYPE_COLOR);
    BoxLabel header;
    if (useIconInLabel() && iconMap != null) {
      BoxLabel label = makeTitleLabel("EnumName", iconMap, CLASS_NAME_FONT,
				      CLASS_NAME_COLOR);
      header = UMLUtil.makeHeader(label, stereotype);
    } else {
      TextShape text = makeTitleText("EnumName", CLASS_NAME_FONT,
				     CLASS_NAME_COLOR);
      header = UMLUtil.makeHeader(text, stereotype);
    }
    header.setClipSubShapes(true);
    shape.setLabel(DrawShapeConstants.ROLE_NODE_TITLE_LABEL, header);

    shape.setAcceptSubshape(false);
    shape.setScaleMode(DrawShapeConstants.SCALE_EXCLUDE_SUBSHAPE);

    Enumeration model = new Enumeration();
    shape.setModel(model);
    shape.setModelListener(new UMLEnumModelListener(useIconInLabel() ? iconMap
						    : null, this));

    DrawShape attr;
    if (useBlock) { 
      attr = makeBlockShape(BlockShape.ENUM_BLOCK, SimpleStatementShape.ENUMERATION,
			    ENUM_FG, ENUM_BG, "Enumeration", "enumeration"); 
    } else { 
      if (useIconInLabel() && iconMap != null) {
	attr = makeContentGroup("enumeration", iconMap, ATTRIBUTE_ICON,
				ATTRIBUTE_FONT, ATTRIBUTE_COLOR);
      } else {
	attr = makeContentGroup("enumeration", null, null, ATTRIBUTE_FONT,
				ATTRIBUTE_COLOR);
      }
    }
    attr.setClipSubShapes(true);
    header.doLayout();
    shape.initAttributeOperation(attr, null);
    shape.fitCompartments();
    //shape.doLayout();

    add(new TemplateToolButton(tempName, shape, iconShape, 36, 30, false, true));
  }

  protected void addInterfaceProvideTemplate(String tempName, float x, float y,
					     float w, float h, String colorkey) {
    DrawShape iconShape = new LineShape(x + w / 2, y + h, x + w / 2, y + 4 * h);
    setLineAttr(iconShape, DrawAttr.SOLID_LINE, null, 0,
		ArrowAttr.ArrowType.HollowDot, 16);
    if (colorkey != null) {
      setPenColor(iconShape, colorkey);
    }

    LineShape line = new LineShape(x + w / 2, y + h, x + w / 2, y + 4 * h);
    setLineAttr(line, DrawAttr.SOLID_LINE, null, 0, null, 0);
    line.setDisplayName("Interface Provided");
    line.setAcceptLabel(false);
    EllipseShape circle = new EllipseShape(x, y, x + w, y + h);
    setNodeAttr(circle);
    circle.setDisplayName("Interface");
    circle.setResizable(false);
    // circle.setSearchable(false);
    circle.setDetachable(false);
    circle.setAllowEdgeOffset(false);
    circle.setAllowLabelOutside(true);
    circle.setClipSubShapes(false);
    if (colorkey != null) {
      setPenColor(line, colorkey);
      setPenColor(circle, colorkey);
    }

    line.initComponent();
    circle.initComponent();

    Group shape = new Group(true); // temporary
    shape.addShape(line);
    shape.addShape(circle);

    circle.setModel(new UMLInterface());
    circle.setModelListener(new UMLInterfaceModelListener());

    add(new TemplateToolButton(tempName, shape, iconShape, 36, 30, false, true));
  }

  protected void addInterfaceRequiredTemplate(String tempName, float x,
					      float y, float w, float h, String colorkey) {
    DrawShape iconShape = new LineShape(x + w / 2, y + h, x + w / 2, y + 4 * h);
    setLineAttr(iconShape, DrawAttr.SOLID_LINE, ArrowAttr.ArrowType.HalfCircle,
		22, null, 0);
    if (colorkey != null) {
      setPenColor(iconShape, colorkey);
    }

    LineShape shape = new LineShape(x + w / 2, y + h, x + w / 2, y + 4 * h);
    setLineAttr(shape, DrawAttr.SOLID_LINE, ArrowAttr.ArrowType.HalfCircle, 22,	null, 0);
    shape.setAcceptLabel(false);
    if (colorkey != null) {
      setPenColor(shape, colorkey);
    }

    add(new TemplateToolButton(tempName, iconShape, shape, 36, 30, false, true));
  }

  protected void addAggregationTemplate(String tempName, boolean composition) {
    addAggregationTemplate(tempName, null, null, composition, null);
  }

  protected void addAggregationTemplate(String tempName, boolean composition,
					String colorkey) {
    addAggregationTemplate(tempName, null, null, composition, colorkey);
  }

  protected void addAggregationTemplate(String tempName, GraphEdgeBase shape,
					boolean composition) {
    addAggregationTemplate(tempName, shape, null, composition, null);
  }

  protected void addAggregationTemplate(String tempName, GraphEdgeBase shape,
					boolean composition, String colorkey) {
    addAggregationTemplate(tempName, shape, null, composition, null);
  }

  protected void addAggregationTemplate(String tempName, 
					GraphEdgeBase shape, DrawShape iconShape,
					boolean composition) {
    addAggregationTemplate(tempName, shape, iconShape, composition, null);
  }

  protected void addAggregationTemplate(String tempName, 
					GraphEdgeBase shape, DrawShape iconShape,
					boolean composition, String colorkey) {
    addAggregationTemplate(tempName, shape, iconShape, 36, 24, 
			   composition, colorkey, TemplateToolButton.TOOL_PANEL_BUTTON);
  }

  protected void addAggregationTemplate(String tempName, 
					GraphEdgeBase shape, DrawShape iconShape,
					int iconWidth, int iconHeight, 
					boolean composition, 
					String colorkey,
					int buttonType) {
    addAggregationTemplate(tempName, shape, iconShape,  iconWidth, iconHeight, 
			   composition, false, colorkey, buttonType);
  }

  protected void addAggregationTemplate(String tempName, 
					GraphEdgeBase shape, DrawShape iconShape,
					int iconWidth, int iconHeight, 
					boolean composition, 
					boolean reverseEnds, 
					String colorkey,
					int buttonType) {
    if (shape == null) {
      shape = new GraphEdgeShape(0, 20, 50, 20);
      iconShape = new LineShape(0, 20, 50, 20);
    }
    setLineAttr(shape, DrawAttr.SOLID_LINE, null, 0,
		composition ? ArrowAttr.ArrowType.FilledDiamond
		: ArrowAttr.ArrowType.HollowDiamond, 10);
    if (colorkey != null) {
      setPenColor(shape, colorkey);
    }

    UMLAssociation model = 
      new UMLAssociation(composition ? UMLAssociation.AssociationType.Composition
			 : UMLAssociation.AssociationType.Aggregation);
    // model.setNavigableToRight(true);
    // model.setNavigableToLeft(true);
    shape.setModel(model);

    if (debug) {
      System.out.println(" UMLClassDiagramTemplate  model: UMLAssociation id=" + model.getId() +
			 " right=" + model.getAssociationEndRight() + 
			 "  left=" + model.getAssociationEndLeft());
    }

    shape.setModelListener(new UMLAssociationModelListener(this));

    if (iconShape != null) { 
      setLineAttr(iconShape, DrawAttr.SOLID_LINE, null, 0,
		  composition ? ArrowAttr.ArrowType.FilledDiamond
		  : ArrowAttr.ArrowType.HollowDiamond, 10);
      if (colorkey != null) {
	setPenColor(iconShape, colorkey);
      }
      add(new TemplateToolButton(tempName, shape, iconShape, iconWidth, iconHeight, 
				 false, true, 
				 TemplateToolButton.DEFAULT_TOOL, 
				 reverseEnds, buttonType));
    } else { 
      add(new TemplateToolButton(tempName, shape, iconWidth, iconHeight, 
				 false, true, 
				 TemplateToolButton.DEFAULT_TOOL, 
				 reverseEnds, buttonType));
    }
  }


  protected void addAggregationTemplate(String tempName, 
					String protoName,
					DrawShape iconShape,
					int iconWidth, int iconHeight, 
					boolean composition, 
					boolean reverseEnds, 
					String colorkey,
					int buttonType) {

    if (iconShape != null) { 
      setLineAttr(iconShape, DrawAttr.SOLID_LINE, null, 0,
		  composition ? ArrowAttr.ArrowType.FilledDiamond
		  : ArrowAttr.ArrowType.HollowDiamond, 10);
      if (colorkey != null) {
	setPenColor(iconShape, colorkey);
      }
      add(new TemplateToolButton(tempName, protoName, 
				 iconShape, iconWidth, iconHeight, 
				 false, true, 
				 TemplateToolButton.DEFAULT_TOOL, 
				 reverseEnds, buttonType));
    }
  }

  protected void addDelegationTemplate(String tempName, 
				       String colorkey) { 
    addDelegationTemplate(tempName, null, null, false, colorkey, 
			  TemplateToolButton.TOOL_PANEL_BUTTON);
  }

  protected void addDelegationTemplate(String tempName, 
				       GraphEdgeBase shape, DrawShape iconShape,
				       boolean reverseEnds, 
				       String colorkey, 
				       int buttonType) {
    if (shape == null) {
      shape = new GraphEdgeShape(0, 20, 50, 20);
      iconShape = new LineShape(0, 20, 50, 20);
    }
    setLineAttr(shape, DrawAttr.SOLID_LINE, ArrowAttr.ArrowType.FilledTriangle, 8, null, 0);
    if (colorkey != null) {
      setPenColor(shape, colorkey);
    }
    shape.setEdgeType(DELEGATION_EDGE);

    UMLAssociation model = new UMLAssociation(UMLAssociation.AssociationType.Delegation);
    model.setNavigabilityToRight(null);
    model.setNavigabilityToLeft(null);
    shape.setModel(model);
    shape.setModelListener(new UMLDelegationModelListener(this));

    if (iconShape != null) { 
      setLineAttr(iconShape, DrawAttr.SOLID_LINE, ArrowAttr.ArrowType.FilledTriangle, 8, null, 0);
      if (colorkey != null) {
	setPenColor(iconShape, colorkey);
      }
      add(new TemplateToolButton(tempName, shape, iconShape, 36, 24, false, true,
				 TemplateToolButton.DEFAULT_TOOL, reverseEnds, buttonType));
    } else { 
      add(new TemplateToolButton(tempName, shape, 36, 24, false, true,
				 TemplateToolButton.DEFAULT_TOOL, reverseEnds, buttonType));
    }
  }

  protected void addDelegationShapeTemplate(String name, 
					    GraphEdgeBase edge, 
					    String colorkey,
					    int iconWidth, int iconHeight) { 
    if (name != null && 
	edge != null) { 
      setLineAttr(edge, DrawAttr.SOLID_LINE, ArrowAttr.ArrowType.FilledTriangle, 8, null, 0);
      if (colorkey != null) {
	setPenColor(edge, colorkey);
      }
      addEdgeShapeTemplate(name, edge, iconWidth, iconHeight);
    }
  }


  @Override
  public void addDefaultStereotypes() {
    // System.out.println("UMLClassDiagramTemplate.addDefaultStereotypes()");

    /*
     * StereotypeManager stManager = StereotypeManager.getInstance();
     * stManager.addAvailableStereotype("xj.model.uml.UMLClass", "class stereotype 1");
     * stManager.addAvailableStereotype("xj.model.uml.UMLClass", "class stereotype 2");
     * stManager.addAvailableStereotype("xj.model.uml.UMLClass", "class stereotype 3");
     * 
     * stManager.addAvailableStereotype("UMLClassDiagram.Class1", "class stereotype 1");
     * stManager.addAvailableStereotype("UMLClassDiagram.Class1", "class stereotype 2");
     * stManager.addAvailableStereotype("UMLClassDiagram.Class1", "class stereotype 3");
     * 
     * stManager.addAvailableStereotype("UMLClassDiagram.Class2", "class stereotype 1");
     * stManager.addAvailableStereotype("UMLClassDiagram.Class2", "class stereotype 2");
     * stManager.addAvailableStereotype("UMLClassDiagram.Class2", "class stereotype 3");
     * 
     * stManager.addAvailableStereotype("UMLClassDiagram.Class3", "class stereotype 1");
     * stManager.addAvailableStereotype("UMLClassDiagram.Class3", "class stereotype 2");
     * stManager.addAvailableStereotype("UMLClassDiagram.Class3", "class stereotype 3");
     * 
     * stManager.addAvailableStereotype("UMLClassDiagram.Class4", "class stereotype 1");
     * stManager.addAvailableStereotype("UMLClassDiagram.Class4", "class stereotype 2");
     * stManager.addAvailableStereotype("UMLClassDiagram.Class4", "class stereotype 3");
     */

  }

  // keys in styleOptions

  // class style
  public static final String CLASS_FG = "template.UMLClassDiagram.Class.fg";

  public static final String CLASS_BG = "template.UMLClassDiagram.Class.bg";

  public static final String ACTIVE_CLASS_FG = "template.UMLClassDiagram.ActiveClass.fg";

  public static final String ACTIVE_CLASS_BG = "template.UMLClassDiagram.ActiveClass.bg";

  public static final String ABSTRACT_CLASS_FG = "template.UMLClassDiagram.AbstractClass.fg";

  public static final String ABSTRACT_CLASS_BG = "template.UMLClassDiagram.AbstractClass.bg";

  public static final String MIXIN_CLASS_FG = "template.UMLClassDiagram.MixinClass.fg";

  public static final String MIXIN_CLASS_BG = "template.UMLClassDiagram.MixinClass.bg";

  public static final String INTERFACE_FG = "template.UMLClassDiagram.Interface.fg";

  public static final String INTERFACE_BG = "template.UMLClassDiagram.Interface.bg";

  public static final String ENUM_FG = "template.UMLClassDiagram.Enum.fg";

  public static final String ENUM_BG = "template.UMLClassDiagram.Enum.bg";

  public static final String EXCEPTION_FG = "template.UMLClassDiagram.Exception.fg";

  public static final String EXCEPTION_BG = "template.UMLClassDiagram.Exception.bg";

  public static final String CLASS_NAME_FONT = "template.UMLClassDiagram.ClassName.font";

  public static final String ABSTRACT_CLASSNAME_FONT = "template.UMLClassDiagram.AbstractClassName.font";

  public static final String INTERFACE_NAME_FONT = "template.UMLClassDiagram.InterfaceName.font";

  public static final String ATTRIBUTE_FONT = "template.UMLClassDiagram.Attribute.font";

  public static final String STATIC_ATTRIBUTE_FONT = "template.UMLClassDiagram.StaticAttribute.font";

  public static final String OPERATION_FONT = "template.UMLClassDiagram.Operation.font";

  public static final String STATIC_OPERATION_FONT = "template.UMLClassDiagram.StaticOperation.font";

  public static final String ABSTRACT_OPERATION_FONT = "template.UMLClassDiagram.AbstractOperation.font";

  public static final String CLASS_NAME_COLOR = "template.UMLClassDiagram.ClassName.color";

  public static final String ABSTRACT_CLASSNAME_COLOR = "template.UMLClassDiagram.AbstractClassName.color";

  public static final String INTERFACE_NAME_COLOR = "template.UMLClassDiagram.InterfaceName.color";

  public static final String ATTRIBUTE_COLOR = "template.UMLClassDiagram.Attribute.color";

  public static final String STATIC_ATTRIBUTE_COLOR = "template.UMLClassDiagram.StaticAttribute.color";

  public static final String OPERATION_COLOR = "template.UMLClassDiagram.Operation.color";

  public static final String STATIC_OPERATION_COLOR = "template.UMLClassDiagram.StaticOperation.color";

  public static final String ABSTRACT_OPERATION_COLOR = "template.UMLClassDiagram.AbstractOperation.color";

  public static final String CLASS_ICON = "classIcon";

  public static final String ABSTRACT_CLASS_ICON = "classAbsIcon";

  public static final String INTERFACE_ICON = "intfIcon";

  public static final String ATTRIBUTE_ICON = "defaultAttributeIcon";

  public static final String PUBLIC_ATTRIBUTE_ICON = "publicAttributeIcon";

  public static final String PROTECTED_ATTRIBUTE_ICON = "protectedAttributeIcon";

  public static final String PRIVATE_ATTRIBUTE_ICON = "privateAttributeIcon";

  public static final String OPERATION_ICON = "defaultOperationIcon";

  public static final String PUBLIC_OPERATION_ICON = "publicOperationIcon";

  public static final String PROTECTED_OPERATION_ICON = "protectedOperationIcon";

  public static final String PRIVATE_OPERATION_ICON = "privateOperationIcon";

  public static final String GENERALIZATION_COLOR = "template.UMLClassDiagram.Generalization.color";

  public static final String MIXIN_COLOR = "template.UMLClassDiagram.MixIn.color";

  public static final String INTERFACE_PROVIDE_COLOR = "template.UMLClassDiagram.InterfaceProvide.color";

  public static final String INTERFACE_REQUIRED_COLOR = "template.UMLClassDiagram.InterfaceRequired.color";

  public static final String ASSOCIATION_COLOR = "template.UMLClassDiagram.Association.color";

  public static final String ASSOCIATION_LABEL_FONT = "template.UMLClassDiagram.AssociationLabel.font";

  public static final String ASSOCIATION_LABEL_COLOR = "template.UMLClassDiagram.AssociationLabel.color";

  public static final String DEPENDENCY_COLOR = "template.UMLClassDiagram.Dependency.color";

  public static final String DELEGATION_COLOR = "template.UMLClassDiagram.Delegation.color";

}
